---
description: Ensure that classes use allowed decorator in its body.
options: null
optionsDescription: Not configurable.
rationale: 'Some decorators can only be used in certain class types. For example, an @Input should not be used in an @Injectable class.'
ruleName: contextual-decorator
type: functionality
typescriptOnly: true
layout: rule
title: 'Rule: contextual-decorator'
optionsJSON: 'null'
---